package cn.datax.service.data.market.table.feign.factory;

import cn.datax.service.data.market.table.feign.DataTableServiceFeign;
import cn.datax.service.data.market.table.feign.fallback.DataTableServiceFeignFallbackImpl;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class DataTableServiceFeignFallbackFactory implements FallbackFactory<DataTableServiceFeign> {

    @Override
    public DataTableServiceFeign create(Throwable throwable) {
        DataTableServiceFeignFallbackImpl dataApiServiceFeignFallback = new DataTableServiceFeignFallbackImpl();
        dataApiServiceFeignFallback.setCause(throwable);
        return dataApiServiceFeignFallback;
    }
}
